
// UIEditor_CPPView.h : interface of the CUIEditor_CPPView class
//


#pragma once
#include "control.h"
#include "UIEditor_CPPDoc.h"


class CUIEditor_CPPView : public CView, public i_data_listener
{
protected: // create from serialization only
	CUIEditor_CPPView();
	DECLARE_DYNCREATE(CUIEditor_CPPView)

// Attributes
public:
	CUIEditor_CPPDoc* GetDocument() const;

	window*	m_window;
	control * m_Tester;

	Bitmap* m_backbuffer;
	Graphics* m_backbufferGraphics;
// Operations
public:
	virtual wchar_t* get_listener_name(){return L"xml_window";}
	virtual void on_event(s_data_event& e);

// Overrides
public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);

// Implementation
public:
	virtual ~CUIEditor_CPPView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	afx_msg void OnFilePrintPreview();
	afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnTimer(UINT_PTR nIDEvent);
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnClose();
	virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	afx_msg void OnSize(UINT nType, int cx, int cy);
};

#ifndef _DEBUG  // debug version in UIEditor_CPPView.cpp
inline CUIEditor_CPPDoc* CUIEditor_CPPView::GetDocument() const
   { return reinterpret_cast<CUIEditor_CPPDoc*>(m_pDocument); }
#endif

